import 'package:flutter_app/generated/json/base/json_convert_content.dart';
import 'package:flutter_app/bean/user_info_entity.dart';

UserInfoEntity $UserInfoEntityFromJson(Map<String, dynamic> json) {
	final UserInfoEntity userInfoEntity = UserInfoEntity();
	final String? appCode = jsonConvert.convert<String>(json['appCode']);
	if (appCode != null) {
		userInfoEntity.appCode = appCode;
	}
	final List<dynamic>? appCodes = jsonConvert.convertListNotNull<dynamic>(json['appCodes']);
	if (appCodes != null) {
		userInfoEntity.appCodes = appCodes;
	}
	final String? appId = jsonConvert.convert<String>(json['appId']);
	if (appId != null) {
		userInfoEntity.appId = appId;
	}
	final String? checkedIdentity = jsonConvert.convert<String>(json['checkedIdentity']);
	if (checkedIdentity != null) {
		userInfoEntity.checkedIdentity = checkedIdentity;
	}
	final String? defaultPlatform = jsonConvert.convert<String>(json['defaultPlatform']);
	if (defaultPlatform != null) {
		userInfoEntity.defaultPlatform = defaultPlatform;
	}
	final int? expiresMillisecond = jsonConvert.convert<int>(json['expiresMillisecond']);
	if (expiresMillisecond != null) {
		userInfoEntity.expiresMillisecond = expiresMillisecond;
	}
	final String? headImgUrl = jsonConvert.convert<String>(json['headImgUrl']);
	if (headImgUrl != null) {
		userInfoEntity.headImgUrl = headImgUrl;
	}
	final String? headUrl = jsonConvert.convert<String>(json['headUrl']);
	if (headUrl != null) {
		userInfoEntity.headUrl = headUrl;
	}
	final String? initPassword = jsonConvert.convert<String>(json['initPassword']);
	if (initPassword != null) {
		userInfoEntity.initPassword = initPassword;
	}
	final String? loginName = jsonConvert.convert<String>(json['loginName']);
	if (loginName != null) {
		userInfoEntity.loginName = loginName;
	}
	final UserInfoLoginPostInfo? loginPostInfo = jsonConvert.convert<UserInfoLoginPostInfo>(json['loginPostInfo']);
	if (loginPostInfo != null) {
		userInfoEntity.loginPostInfo = loginPostInfo;
	}
	final String? loginTime = jsonConvert.convert<String>(json['loginTime']);
	if (loginTime != null) {
		userInfoEntity.loginTime = loginTime;
	}
	final String? loginType = jsonConvert.convert<String>(json['loginType']);
	if (loginType != null) {
		userInfoEntity.loginType = loginType;
	}
	final List<dynamic>? menuIds = jsonConvert.convertListNotNull<dynamic>(json['menuIds']);
	if (menuIds != null) {
		userInfoEntity.menuIds = menuIds;
	}
	final String? nickName = jsonConvert.convert<String>(json['nickName']);
	if (nickName != null) {
		userInfoEntity.nickName = nickName;
	}
	final String? openId = jsonConvert.convert<String>(json['openId']);
	if (openId != null) {
		userInfoEntity.openId = openId;
	}
	final List<UserInfoPermissionMenuDTOS>? permissionMenuDTOS = jsonConvert.convertListNotNull<UserInfoPermissionMenuDTOS>(json['permissionMenuDTOS']);
	if (permissionMenuDTOS != null) {
		userInfoEntity.permissionMenuDTOS = permissionMenuDTOS;
	}
	final UserInfoPermissionMenus? permissionMenus = jsonConvert.convert<UserInfoPermissionMenus>(json['permissionMenus']);
	if (permissionMenus != null) {
		userInfoEntity.permissionMenus = permissionMenus;
	}
	final List<UserInfoRoleVOList>? roleVOList = jsonConvert.convertListNotNull<UserInfoRoleVOList>(json['roleVOList']);
	if (roleVOList != null) {
		userInfoEntity.roleVOList = roleVOList;
	}
	final String? sessionKey = jsonConvert.convert<String>(json['sessionKey']);
	if (sessionKey != null) {
		userInfoEntity.sessionKey = sessionKey;
	}
	final String? telephone = jsonConvert.convert<String>(json['telephone']);
	if (telephone != null) {
		userInfoEntity.telephone = telephone;
	}
	final String? tenantId = jsonConvert.convert<String>(json['tenantId']);
	if (tenantId != null) {
		userInfoEntity.tenantId = tenantId;
	}
	final String? token = jsonConvert.convert<String>(json['token']);
	if (token != null) {
		userInfoEntity.token = token;
	}
	final List<UserInfoUiasRoleList>? uiasRoleList = jsonConvert.convertListNotNull<UserInfoUiasRoleList>(json['uiasRoleList']);
	if (uiasRoleList != null) {
		userInfoEntity.uiasRoleList = uiasRoleList;
	}
	final String? userId = jsonConvert.convert<String>(json['userId']);
	if (userId != null) {
		userInfoEntity.userId = userId;
	}
	final String? userName = jsonConvert.convert<String>(json['userName']);
	if (userName != null) {
		userInfoEntity.userName = userName;
	}
	final List<UserInfoUserOrgPostDTOList>? userOrgPostDTOList = jsonConvert.convertListNotNull<UserInfoUserOrgPostDTOList>(json['userOrgPostDTOList']);
	if (userOrgPostDTOList != null) {
		userInfoEntity.userOrgPostDTOList = userOrgPostDTOList;
	}
	final int? userType = jsonConvert.convert<int>(json['userType']);
	if (userType != null) {
		userInfoEntity.userType = userType;
	}
	return userInfoEntity;
}

Map<String, dynamic> $UserInfoEntityToJson(UserInfoEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['appCode'] = entity.appCode;
	data['appCodes'] =  entity.appCodes;
	data['appId'] = entity.appId;
	data['checkedIdentity'] = entity.checkedIdentity;
	data['defaultPlatform'] = entity.defaultPlatform;
	data['expiresMillisecond'] = entity.expiresMillisecond;
	data['headImgUrl'] = entity.headImgUrl;
	data['headUrl'] = entity.headUrl;
	data['initPassword'] = entity.initPassword;
	data['loginName'] = entity.loginName;
	data['loginPostInfo'] = entity.loginPostInfo?.toJson();
	data['loginTime'] = entity.loginTime;
	data['loginType'] = entity.loginType;
	data['menuIds'] =  entity.menuIds;
	data['nickName'] = entity.nickName;
	data['openId'] = entity.openId;
	data['permissionMenuDTOS'] =  entity.permissionMenuDTOS?.map((v) => v.toJson()).toList();
	data['permissionMenus'] = entity.permissionMenus?.toJson();
	data['roleVOList'] =  entity.roleVOList?.map((v) => v.toJson()).toList();
	data['sessionKey'] = entity.sessionKey;
	data['telephone'] = entity.telephone;
	data['tenantId'] = entity.tenantId;
	data['token'] = entity.token;
	data['uiasRoleList'] =  entity.uiasRoleList?.map((v) => v.toJson()).toList();
	data['userId'] = entity.userId;
	data['userName'] = entity.userName;
	data['userOrgPostDTOList'] =  entity.userOrgPostDTOList?.map((v) => v.toJson()).toList();
	data['userType'] = entity.userType;
	return data;
}

UserInfoLoginPostInfo $UserInfoLoginPostInfoFromJson(Map<String, dynamic> json) {
	final UserInfoLoginPostInfo userInfoLoginPostInfo = UserInfoLoginPostInfo();
	final String? districtLevel = jsonConvert.convert<String>(json['districtLevel']);
	if (districtLevel != null) {
		userInfoLoginPostInfo.districtLevel = districtLevel;
	}
	final int? isDefault = jsonConvert.convert<int>(json['isDefault']);
	if (isDefault != null) {
		userInfoLoginPostInfo.isDefault = isDefault;
	}
	final String? orgAlias = jsonConvert.convert<String>(json['orgAlias']);
	if (orgAlias != null) {
		userInfoLoginPostInfo.orgAlias = orgAlias;
	}
	final String? orgId = jsonConvert.convert<String>(json['orgId']);
	if (orgId != null) {
		userInfoLoginPostInfo.orgId = orgId;
	}
	final String? orgName = jsonConvert.convert<String>(json['orgName']);
	if (orgName != null) {
		userInfoLoginPostInfo.orgName = orgName;
	}
	final String? orgPostId = jsonConvert.convert<String>(json['orgPostId']);
	if (orgPostId != null) {
		userInfoLoginPostInfo.orgPostId = orgPostId;
	}
	final String? orgType = jsonConvert.convert<String>(json['orgType']);
	if (orgType != null) {
		userInfoLoginPostInfo.orgType = orgType;
	}
	final String? postId = jsonConvert.convert<String>(json['postId']);
	if (postId != null) {
		userInfoLoginPostInfo.postId = postId;
	}
	final String? postName = jsonConvert.convert<String>(json['postName']);
	if (postName != null) {
		userInfoLoginPostInfo.postName = postName;
	}
	return userInfoLoginPostInfo;
}

Map<String, dynamic> $UserInfoLoginPostInfoToJson(UserInfoLoginPostInfo entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['districtLevel'] = entity.districtLevel;
	data['isDefault'] = entity.isDefault;
	data['orgAlias'] = entity.orgAlias;
	data['orgId'] = entity.orgId;
	data['orgName'] = entity.orgName;
	data['orgPostId'] = entity.orgPostId;
	data['orgType'] = entity.orgType;
	data['postId'] = entity.postId;
	data['postName'] = entity.postName;
	return data;
}

UserInfoPermissionMenuDTOS $UserInfoPermissionMenuDTOSFromJson(Map<String, dynamic> json) {
	final UserInfoPermissionMenuDTOS userInfoPermissionMenuDTOS = UserInfoPermissionMenuDTOS();
	final String? appCode = jsonConvert.convert<String>(json['appCode']);
	if (appCode != null) {
		userInfoPermissionMenuDTOS.appCode = appCode;
	}
	final String? belongPage = jsonConvert.convert<String>(json['belongPage']);
	if (belongPage != null) {
		userInfoPermissionMenuDTOS.belongPage = belongPage;
	}
	final String? menuCode = jsonConvert.convert<String>(json['menuCode']);
	if (menuCode != null) {
		userInfoPermissionMenuDTOS.menuCode = menuCode;
	}
	final String? menuId = jsonConvert.convert<String>(json['menuId']);
	if (menuId != null) {
		userInfoPermissionMenuDTOS.menuId = menuId;
	}
	final String? menuName = jsonConvert.convert<String>(json['menuName']);
	if (menuName != null) {
		userInfoPermissionMenuDTOS.menuName = menuName;
	}
	final int? menuType = jsonConvert.convert<int>(json['menuType']);
	if (menuType != null) {
		userInfoPermissionMenuDTOS.menuType = menuType;
	}
	final String? menuUrl = jsonConvert.convert<String>(json['menuUrl']);
	if (menuUrl != null) {
		userInfoPermissionMenuDTOS.menuUrl = menuUrl;
	}
	final String? pid = jsonConvert.convert<String>(json['pid']);
	if (pid != null) {
		userInfoPermissionMenuDTOS.pid = pid;
	}
	return userInfoPermissionMenuDTOS;
}

Map<String, dynamic> $UserInfoPermissionMenuDTOSToJson(UserInfoPermissionMenuDTOS entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['appCode'] = entity.appCode;
	data['belongPage'] = entity.belongPage;
	data['menuCode'] = entity.menuCode;
	data['menuId'] = entity.menuId;
	data['menuName'] = entity.menuName;
	data['menuType'] = entity.menuType;
	data['menuUrl'] = entity.menuUrl;
	data['pid'] = entity.pid;
	return data;
}

UserInfoPermissionMenus $UserInfoPermissionMenusFromJson(Map<String, dynamic> json) {
	final UserInfoPermissionMenus userInfoPermissionMenus = UserInfoPermissionMenus();
	final UserInfoPermissionMenusAdditionalProperties1? additionalProperties1 = jsonConvert.convert<UserInfoPermissionMenusAdditionalProperties1>(json['additionalProperties1']);
	if (additionalProperties1 != null) {
		userInfoPermissionMenus.additionalProperties1 = additionalProperties1;
	}
	return userInfoPermissionMenus;
}

Map<String, dynamic> $UserInfoPermissionMenusToJson(UserInfoPermissionMenus entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['additionalProperties1'] = entity.additionalProperties1?.toJson();
	return data;
}

UserInfoPermissionMenusAdditionalProperties1 $UserInfoPermissionMenusAdditionalProperties1FromJson(Map<String, dynamic> json) {
	final UserInfoPermissionMenusAdditionalProperties1 userInfoPermissionMenusAdditionalProperties1 = UserInfoPermissionMenusAdditionalProperties1();
	final String? appCode = jsonConvert.convert<String>(json['appCode']);
	if (appCode != null) {
		userInfoPermissionMenusAdditionalProperties1.appCode = appCode;
	}
	final String? belongPage = jsonConvert.convert<String>(json['belongPage']);
	if (belongPage != null) {
		userInfoPermissionMenusAdditionalProperties1.belongPage = belongPage;
	}
	final String? menuCode = jsonConvert.convert<String>(json['menuCode']);
	if (menuCode != null) {
		userInfoPermissionMenusAdditionalProperties1.menuCode = menuCode;
	}
	final String? menuId = jsonConvert.convert<String>(json['menuId']);
	if (menuId != null) {
		userInfoPermissionMenusAdditionalProperties1.menuId = menuId;
	}
	final String? menuName = jsonConvert.convert<String>(json['menuName']);
	if (menuName != null) {
		userInfoPermissionMenusAdditionalProperties1.menuName = menuName;
	}
	final int? menuType = jsonConvert.convert<int>(json['menuType']);
	if (menuType != null) {
		userInfoPermissionMenusAdditionalProperties1.menuType = menuType;
	}
	final String? menuUrl = jsonConvert.convert<String>(json['menuUrl']);
	if (menuUrl != null) {
		userInfoPermissionMenusAdditionalProperties1.menuUrl = menuUrl;
	}
	final String? pid = jsonConvert.convert<String>(json['pid']);
	if (pid != null) {
		userInfoPermissionMenusAdditionalProperties1.pid = pid;
	}
	return userInfoPermissionMenusAdditionalProperties1;
}

Map<String, dynamic> $UserInfoPermissionMenusAdditionalProperties1ToJson(UserInfoPermissionMenusAdditionalProperties1 entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['appCode'] = entity.appCode;
	data['belongPage'] = entity.belongPage;
	data['menuCode'] = entity.menuCode;
	data['menuId'] = entity.menuId;
	data['menuName'] = entity.menuName;
	data['menuType'] = entity.menuType;
	data['menuUrl'] = entity.menuUrl;
	data['pid'] = entity.pid;
	return data;
}

UserInfoRoleVOList $UserInfoRoleVOListFromJson(Map<String, dynamic> json) {
	final UserInfoRoleVOList userInfoRoleVOList = UserInfoRoleVOList();
	final String? orgPostRoleType = jsonConvert.convert<String>(json['orgPostRoleType']);
	if (orgPostRoleType != null) {
		userInfoRoleVOList.orgPostRoleType = orgPostRoleType;
	}
	final String? roleCode = jsonConvert.convert<String>(json['roleCode']);
	if (roleCode != null) {
		userInfoRoleVOList.roleCode = roleCode;
	}
	final String? roleName = jsonConvert.convert<String>(json['roleName']);
	if (roleName != null) {
		userInfoRoleVOList.roleName = roleName;
	}
	final String? userId = jsonConvert.convert<String>(json['userId']);
	if (userId != null) {
		userInfoRoleVOList.userId = userId;
	}
	return userInfoRoleVOList;
}

Map<String, dynamic> $UserInfoRoleVOListToJson(UserInfoRoleVOList entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['orgPostRoleType'] = entity.orgPostRoleType;
	data['roleCode'] = entity.roleCode;
	data['roleName'] = entity.roleName;
	data['userId'] = entity.userId;
	return data;
}

UserInfoUiasRoleList $UserInfoUiasRoleListFromJson(Map<String, dynamic> json) {
	final UserInfoUiasRoleList userInfoUiasRoleList = UserInfoUiasRoleList();
	final String? roleCode = jsonConvert.convert<String>(json['roleCode']);
	if (roleCode != null) {
		userInfoUiasRoleList.roleCode = roleCode;
	}
	final String? roleId = jsonConvert.convert<String>(json['roleId']);
	if (roleId != null) {
		userInfoUiasRoleList.roleId = roleId;
	}
	final String? roleName = jsonConvert.convert<String>(json['roleName']);
	if (roleName != null) {
		userInfoUiasRoleList.roleName = roleName;
	}
	final int? roleType = jsonConvert.convert<int>(json['roleType']);
	if (roleType != null) {
		userInfoUiasRoleList.roleType = roleType;
	}
	final String? sourceId = jsonConvert.convert<String>(json['sourceId']);
	if (sourceId != null) {
		userInfoUiasRoleList.sourceId = sourceId;
	}
	final String? sourceType = jsonConvert.convert<String>(json['sourceType']);
	if (sourceType != null) {
		userInfoUiasRoleList.sourceType = sourceType;
	}
	return userInfoUiasRoleList;
}

Map<String, dynamic> $UserInfoUiasRoleListToJson(UserInfoUiasRoleList entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['roleCode'] = entity.roleCode;
	data['roleId'] = entity.roleId;
	data['roleName'] = entity.roleName;
	data['roleType'] = entity.roleType;
	data['sourceId'] = entity.sourceId;
	data['sourceType'] = entity.sourceType;
	return data;
}

UserInfoUserOrgPostDTOList $UserInfoUserOrgPostDTOListFromJson(Map<String, dynamic> json) {
	final UserInfoUserOrgPostDTOList userInfoUserOrgPostDTOList = UserInfoUserOrgPostDTOList();
	final String? districtLevel = jsonConvert.convert<String>(json['districtLevel']);
	if (districtLevel != null) {
		userInfoUserOrgPostDTOList.districtLevel = districtLevel;
	}
	final int? isDefault = jsonConvert.convert<int>(json['isDefault']);
	if (isDefault != null) {
		userInfoUserOrgPostDTOList.isDefault = isDefault;
	}
	final String? orgAlias = jsonConvert.convert<String>(json['orgAlias']);
	if (orgAlias != null) {
		userInfoUserOrgPostDTOList.orgAlias = orgAlias;
	}
	final String? orgId = jsonConvert.convert<String>(json['orgId']);
	if (orgId != null) {
		userInfoUserOrgPostDTOList.orgId = orgId;
	}
	final String? orgName = jsonConvert.convert<String>(json['orgName']);
	if (orgName != null) {
		userInfoUserOrgPostDTOList.orgName = orgName;
	}
	final String? orgPostId = jsonConvert.convert<String>(json['orgPostId']);
	if (orgPostId != null) {
		userInfoUserOrgPostDTOList.orgPostId = orgPostId;
	}
	final String? orgType = jsonConvert.convert<String>(json['orgType']);
	if (orgType != null) {
		userInfoUserOrgPostDTOList.orgType = orgType;
	}
	final String? postId = jsonConvert.convert<String>(json['postId']);
	if (postId != null) {
		userInfoUserOrgPostDTOList.postId = postId;
	}
	final String? postName = jsonConvert.convert<String>(json['postName']);
	if (postName != null) {
		userInfoUserOrgPostDTOList.postName = postName;
	}
	return userInfoUserOrgPostDTOList;
}

Map<String, dynamic> $UserInfoUserOrgPostDTOListToJson(UserInfoUserOrgPostDTOList entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['districtLevel'] = entity.districtLevel;
	data['isDefault'] = entity.isDefault;
	data['orgAlias'] = entity.orgAlias;
	data['orgId'] = entity.orgId;
	data['orgName'] = entity.orgName;
	data['orgPostId'] = entity.orgPostId;
	data['orgType'] = entity.orgType;
	data['postId'] = entity.postId;
	data['postName'] = entity.postName;
	return data;
}